package com.cd2cd.code_template.controller;

import com.cd2cd.code_template.configuration.authority.AuthControl;
import com.cd2cd.code_template.configuration.constants.AuthTypeEnum;
import com.cd2cd.code_template.service.SysAuthService;
import com.cd2cd.code_template.vo.BaseRes;
import com.cd2cd.code_template.vo.SysAuthVo;
import java.util.List;
import javax.annotation.Resource;
import javax.annotation.Title;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/sys-auth")
@AuthControl(name = "权限配置",type = AuthTypeEnum.Backend,routePath = "/system-auth/:type/:id")
public class SysAuthController {

    @Resource
    private SysAuthService sysAuthService;

    /**
     * @gen_907_lwl
     * 获取权限列表
     * 获取权限列表
     * @param sysAuthVo
    **/
    @Title("获取权限列表")
    @ResponseBody
    @RequestMapping(value="list", method=RequestMethod.GET)
    public BaseRes<List<SysAuthVo>> getAuthList(SysAuthVo sysAuthVo) {
        return sysAuthService.getAuthList(sysAuthVo);
    }
}